﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kaleta.Network
{
    public class UniqueKeyGenerator : Random
    {
        public UniqueKeyGenerator(int seed)
        {
            this.seed = (ulong)seed;
        }

        public override int Next()
        {
            seed = seed * m + c;
            return (int)(seed & 0xFFFFFFFFu);
        }

        private ulong seed;
        const ulong m = 1664525;
        const ulong c = 1013904223;
    }
}
